cmake_minimum_required(VERSION 3.0.2)
project(env_edt)

find_package(catkin REQUIRED COMPONENTS
        bezier
        roscpp
        std_msgs
        sdf_tools
        pos_generator
        )
find_package(Eigen3 REQUIRED)
set(Eigen3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})

catkin_package(
        INCLUDE_DIRS include
        LIBRARIES env_edt
        CATKIN_DEPENDS bezier roscpp std_msgs pos_generator sdf_tools
        #  DEPENDS system_lib
)

###########
## Build ##
###########

include_directories(
        include
        ${catkin_INCLUDE_DIRS}
        ${Eigen3_INCLUDE_DIRS}
        ${PROJECT_SOURCE_DIR}/third_party
)

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS} -O3 -Wall")

add_library(env_edt
        src/plan_map.cpp
        src/corridor_generator.cpp
        src/raycast.cpp
        ${PROJECT_SOURCE_DIR}/third_party/fast_methods/console/console.cpp
        ${PROJECT_SOURCE_DIR}/third_party/fast_methods/fm/fmdata/fmcell.cpp
        ${PROJECT_SOURCE_DIR}/third_party/fast_methods/ndgridmap/cell.cpp
        )
target_link_libraries(env_edt
        ${catkin_LIBRARIES}
        sdf_tools
        )
